package com.yifei.model.enums;

import com.yifei.model.result.IResultCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@AllArgsConstructor
@NoArgsConstructor
public enum ResultCode implements IResultCode, Serializable {

    SUCCESS("00000", "操作成功"),

    USER_NOT_ROLE("A0271", "用户未分配角色"),

    TOKEN_INVALID("A0230", "token无效或已过期"),
    TOKEN_ACCESS_FORBIDDEN("A0231", "token已被禁止访问"),

    VERIFY_CODE_TIMEOUT("A0213", "验证码已过期"),
    VERIFY_CODE_ERROR("A0214", "验证码错误"),

    RESOURCE_NOT_FOUND("A0401", "请求资源不存在"),

    ACCESS_UNAUTHORIZED("A0301", "访问未授权"),

    REQUEST_MORE_ERROR("B0201", "请求次数过多,请稍后再试"),
    REQUEST_RESUBMIT_ERROR("B202", "重复提交,请稍后再试"),
    REQUEST_PARAMETER_ERROR("B203", "字段填写错误"),

    SYSTEM_EXECUTION_ERROR("A0500", "系统执行错误"),
    SYSTEM_EXCEPTION_ERROR("A0501", "未知异常");

    @Getter
    private String code;

    @Getter
    private String msg;

}